# class SZT:
#     def __init__(self):
#         self.age = 18
#     def go_to_school(self):
#         print(f"我是szt今年{self.age}岁了")
# n1 = SZT()
# n1.go_to_school()
class Student:
    def __init__(self, name, student_id):
        self.name = name
        self.student_id = student_id
        self.grades = {"语文":0, "数学":0,"英语":0}
    def set_grades(self, course,grades):
        if course in self.grades:
            self.grades[course] = grades
    def print_grades(self):
        print(self.name, self.student_id)
        for course, grades in self.grades.items():
            print(f"{course}: {grades}")
gan = Student("甘霖", 20240405026)
szt = Student("小宋", 20240405027)
print(gan.name, gan.student_id)
szt.set_grades("英语",150)
szt.print_grades()
